package com.sun.demo;


import com.sun.demo.job.Job03;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.PostConstruct;

//@Component
public class SpringJob01 {

    @Autowired
    private Scheduler scheduler;

    @PostConstruct
    public void initJob03() throws SchedulerException {
        JobDetail jobDetail = JobBuilder.newJob(Job03.class).build();

        Trigger trigger = TriggerBuilder.newTrigger().build();

        scheduler.scheduleJob(jobDetail,trigger);
    }

    public static void main(String[] args) {
        String str = "123HH";
        String replace = str.replace("HH", "草泥马");
        System.out.println(replace);
        System.out.println(str);
    }
}
